﻿<%@ Page Title="" Language="C#" MasterPageFile="~/public_page/master_page_common2.master" AutoEventWireup="true" CodeFile="user_infoMod.aspx.cs" Inherits="public_page_user_infoMod" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CPH_Right" Runat="Server">

    <form id="form1" runat="server">
    <div class="crumbs">
        您的位置： <a href="user_toIndex.aspx">用户服务</a><span>&gt;</span><a href="#">用户信息修改</a>
    </div>
    <div class="box-title">
        用户信息修改</div>

    <script type="text/javascript">
        function check_email() {
            try {
                email = $("#Txt_email").val();
                if (email != '') {
                    if (isEmail(email) == false) {
                        $("#error").html("电子邮箱地址不正确，请重新输入！");
                        return;
                    }

                    var tempReceive = public_page_user_infoMod.check_user_name(email, 1).value;

                    if (tempReceive == true) {
                        document.getElementById("Btn_check_email").style.display = "none";
                        document.getElementById("span_check_email").style.display = "block";

                        $("#error").html("");
                    }
                    else {
                        document.getElementById("Btn_check_email").style.display = "block";
                        document.getElementById("span_check_email").style.display = "none";

                        $("#error").html("该邮箱已注册，请重新输入邮箱地址！");
                    }
                }
            } catch (e) { alert(e); }
        }

        function onchanged_email() {
            document.getElementById("Btn_check_email").style.display = "block";
            document.getElementById("span_check_email").style.display = "none";
        }

        function check_submit() {
            email = $("#Txt_email").val();
            mobile = $("#Txt_mobile").val();
            address = $("#Txt_address").val();
            CheckCode = $("#Txt_CheckCode").val();
            zip_code = $("#Txt_zip_code").val();

            if (email == '') {
                $("#error").html("请输入电子邮箱地址");
                return false;
            }
            else if (isEmail(email) == false) {
                $("#error").html("电子邮箱地址不正确，请重新输入！");
                return false;
            }

            var mobile_patrn = new RegExp("^1[0-9]{10,10}$");
            var post_code = new RegExp("^[0-9]{6,6}$");
            if (mobile != '' && !mobile_patrn.test(mobile)) {
                $("#error").html("请输入11位手机号");
                return false;
            }

            if (zip_code != '' && !post_code.test(zip_code)) {
                $("#error").html("邮政编码必须6位数字");
                return false;
            }

        }

    </script>

    <div class="apply-from">
        <div id='error' style="text-align: center; padding-left: 15px; padding-right: 15px;
            color: red; font-size: 14px; font-weight: bold;">
        </div>
        <fieldset>
            
            <div class="fm-item">
                <label class="fm-label">用户名：</label><asp:TextBox runat="server" ID="Txt_user_name" CssClass="i-text" ReadOnly=true />
            </div>
            
            <div class="fm-item">
                <label class="fm-label">
                    性别：</label>
                <asp:DropDownList runat="server" ID="Ddl_gender" CssClass="select" AutoPostBack="false">
                    <asp:ListItem Text="男" Value="男" Selected="True"></asp:ListItem>
                    <asp:ListItem Text="女" Value="女"></asp:ListItem>
                </asp:DropDownList>
            </div>
            <div class="fm-item">
                <label class="fm-label">
                    E-mail：</label><asp:TextBox runat="server" ID="Txt_email" CssClass="i-text" />
                <span class="red">*</span><input type="button" id="Btn_check_email" value="邮箱是否可用"
                    onclick="check_email();" />
                <span style="display: none; color: green" id="span_check_email">可用</span>
                <div class="fm-explain">
                    电子邮箱方便您获取交易凭证和找回密码<span class="arrow"></span></div>
            </div>
            <div class="fm-item">
                <label class="fm-label">
                    联系手机：</label><asp:TextBox runat="server" ID="Txt_mobile" CssClass="i-text" />
                <div class="fm-explain">
                    建议输入，方便找回密码<span class="arrow"></span></div>
            </div>
            <div class="fm-item">
                <label class="fm-label">
                    真实姓名：</label><asp:TextBox runat="server" ID="Txt_true_name" CssClass="i-text" />
                <div class="fm-explain">
                    为了使您能够得到最优质最安全的服务，请准确填写真实姓名<span class="arrow"></span></div>
            </div>
            <div class="fm-item">
                <label class="fm-label">
                    证件类型：</label><asp:DropDownList runat="server" ID="Ddl_doc_type_id" CssClass="select"
                        AutoPostBack="false" />
                <div class="fm-explain">
                    请选择您的证件类型<span class="arrow"></span></div>
            </div>
            <div class="fm-item">
                <label class="fm-label">
                    证件号码：</label><asp:TextBox runat="server" ID="Txt_doc_num" CssClass="i-text" />
                <div class="fm-explain">
                    为了使您能够得到最优质最安全的服务，请准确填写证件号码<span class="arrow"></span></div>
            </div>
            <div class="fm-item">
                <label class="fm-label">
                    联系地址：</label><asp:TextBox runat="server" ID="Txt_address" CssClass="i-text" />
            </div>
            <div class="fm-item">
                <label class="fm-label">
                    邮编：</label><asp:TextBox runat="server" ID="Txt_zip_code" CssClass="i-text" MaxLength='6' />
                <div class="fm-explain">
                    请输入6位数字邮编<span class="arrow"></span></div>
            </div>
           
            <div class="fm-item">
                <span>
                    <asp:Button runat="server" ID="BtnOK" Text="确认" OnClick="BtnOK_Click" />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="button" onclick="javascript:window.history.back()" value="返  回" />
                </span>
            </div>
        </fieldset>
    </div>
    </form>
</asp:Content>

